﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;


namespace MvcShop.Models.Models
{
    [MetadataType(typeof(ControllerActionRoleMetadata))]
    public partial class ControllerActionRole
    {
    }

    public class ControllerActionRoleMetadata
    {
        [DisplayName("是否允许访问")]
        public bool IsAllowed { get; set; }

        [Required(ErrorMessage = "用户角色不能为空。")]
        [DisplayName("角色序号")]
        public int RoleId { get; set; }

        [Required(ErrorMessage = "ControlerAction不能为空。")]
        [DisplayName("ControlerAction序号")]
        public int ControlerActionId { get; set; }
    }
}
